Save shared image or pdf to selected directory